package org.someone.common;

import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;

public class MapUtils {
	
	/**
	 * 获得Map中所有数字的和
	 * @param srcmap	源map
	 * @return
	 */
	public static double sumFloatValue(Map<String, String> srcmap){
		double dbSumValue = 0.0;
		Iterator<Entry<String, String>> it = srcmap.entrySet().iterator();
		while(it.hasNext()){
			Entry<String, String> entry = it.next();
			String strValue = entry.getValue();
			if(CustomMaths.isNumeric(strValue)){
				dbSumValue += Double.parseDouble(strValue);
			};
		}
		return dbSumValue;
	}
}
